const express = require('express');
const router = express.Router();
const { authenticateAdmin } = require('../middleware/auth');
const { getAdminLogs, getLogDetail, getLogStats } = require('../middleware/adminLogger');

// 所有接口都需要管理员权限
router.use(authenticateAdmin);

// 获取操作日志列表
router.get('/', getAdminLogs);

// 获取日志详情
router.get('/:id', getLogDetail);

// 获取操作统计
router.get('/stats/overview', getLogStats);

module.exports = router;

